fix: add OpenAPIModelName for PackageManifest to fix oc explain #3755
+152
−120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change:
The
oc explain packagemanifests --api-version=packages.operators.coreos.com/v1command was failing because:Motivation for the change:
To address openshift/operator-framework-olm#1208 (comment)
{ fail [github.com/openshift/origin/test/extended/cli/explain.go:608]: Unexpected error: <*errors.errorString | 0xc0015b8140>: Error running oc --namespace=e2e-test-oc-explain-2xzmz --kubeconfig=/tmp/configfile168747619 explain packagemanifests --api-version=packages.operators.coreos.com/v1: StdOut> GROUP: packages.operators.coreos.com KIND: PackageManifest VERSION: v1 StdErr> error: GVK map[group:packages.operators.coreos.com kind:PackageManifest version:v1] not found in OpenAPI schema exit status 1 : error: GVK map[group:packages.operators.coreos.com kind:PackageManifest version:v1] not found in OpenAPI schema { s: "Error running oc --namespace=e2e-test-oc-explain-2xzmz --kubeconfig=/tmp/configfile168747619 explain packagemanifests --api-version=packages.operators.coreos.com/v1:\nStdOut>\nGROUP: packages.operators.coreos.com\nKIND: PackageManifest\nVERSION: v1\nStdErr>\nerror: GVK map[group:packages.operators.coreos.com kind:PackageManifest version:v1] not found in OpenAPI schema\nexit status 1\n: error: GVK map[group:packages.operators.coreos.com kind:PackageManifest version:v1] not found in OpenAPI schema", }Architectural changes:
With this fix:
Testing remarks:
Reviewer Checklist
/doc[FLAKE]are truly flaky and have an issueAssisted-By: Claude-Code